#ifndef Vector3d_h__
#define Vector3d_h__

typedef struct
{
	double x;
	double y;
	double z;
} Vector3d;

/* create Vector3d from values x,y,z
 * @param double x - x value for the vector
 * @param double y - y value for the vector
 * @param double z - z value for the vector
 * @return Vector3d using values x,y,z;
 */
Vector3d Vector3d_FromValues( double x, double y, double z );

/* normalize given vector v; 
 * vector v will not be modified.
 * @param Vector3d* v - vector to be normalized.
 * @return: normalized Vector3d.
 */
Vector3d Vector3d_normalized( Vector3d* v );

/* multiply vector v by scalar value s.
 * vector v will not be modified.
 * @param Vector3d* v - vector to be multiplied.
 * @param double s - scalar value for multiplication.
 * @return: v*s as Vector3d.
 */
Vector3d Vector3d_multiply( Vector3d* v, double s );

/* add vector v to vector u. 
 * vectors u,v will not be modified.
 * @param Vector3d* u - left vector.
 * @param Vector3d* v - right vector.
 * @return: u+v as Vector3d.
 */
Vector3d Vector3d_add( Vector3d* u, Vector3d* v );

/* subtract vector v to vector u. 
 * vectors u,v will not be modified.
 * @param Vector3d* u - left vector.
 * @param Vector3d* v - right vector.
 * @return:  u-v as Vector3d.
 */
Vector3d Vector3d_sub( Vector3d* u, Vector3d* v );

/* calculate dot product of u and v. 
 * @param Vector3d* u - left vector.
 * @param Vector3d* v - right vector.
 * @return: u*v as double.
 */
double Vector3d_dot( Vector3d* u, Vector3d* v );

/* calculate cross product of u and v. 
 * @param Vector3d* u - left vector.
 * @param Vector3d* v - right vector.
 * @return: u x v as Vector3d.
 */
Vector3d Vector3d_cross( Vector3d* u, Vector3d* vS );

#endif // Vector3d_h__
